import axios from 'axios'
import './http'
// 正式环境
const baseUrl2 = 'https://www.dgsrlzysc.com'
// 测试环境
// const baseUrl2 = 'https://www.ssywxyqk.cn'

// 首页
export const EnterpriseByPageInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/searchRm') } // 企业优先
export const PositionByPageInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/position/searchRm') } // 岗位
// export const EnterpriseByPageInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/getGoodEnterpriseByPageInfo', { params: params }) } // 企业优先
// export const PositionByPageInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/position/getPositionByPageInfo', { params: params }) } // 岗位
export const Position = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/position/getPosition', { params: params }) } // 职位详情
export const updatePosition = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/position/updatePosition', params) } // 职位更新
export const OccupationType = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/occupation/getOccupationTypeAndItemList', { params: params }) } // 岗位分类
export const CommonPicList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/banner/getBannerPic', { params: params }) } // 轮播图
export const AdvImages = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/adv/getAdvImages', { params: params }) } // 广告图
export const EnterpriseDataDict = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterpriselib/getEnterpriseDataDict', { params: params }) } // 企业筛选
export const AllEnterpriseByPage = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/getAllEnterpriseByPage', { params: params }) } // 企业列表
export const findWorkList = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/position/findWorkList', params) } // 职位列表
export const EnterpriseLibList = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/enterpriselib/getEnterpriseLibList', params) } // 企业库
export const InquityLocalByType = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/common/getInquityLocalByType', { params: params }) } // 资讯 一级
export const LocalInquiryState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getLocalInquiryState', { params: params }) } // 本地资讯分类
export const searchInquiryLocal = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/common/searchInquiryLocal', { params: params }) }
export const searchInquiryWorkplace = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/common/searchInquiryWorkplace', { params: params }) }
export const WorkplaceInquiryState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getWorkplaceInquiryState', { params: params }) } // 职场资讯分类
export const CommonInfoBySecondType = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/common/getInquityWorkplaceByType', { params: params }) } // 资讯 一级
export const CommonInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/common/getInquityLocal', { params: params }) } // bendi资讯详情
export const InquiryWorkplace = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/common/getInquiryWorkplace', { params: params }) } // 职场资讯详情
export const EnterpriseInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/getEnterpriseInfo', { params: params }) } // 企业详情
export const updateEnterpriseInfo = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/enterprise/updateEnterpriseInfo', params) } // 更新企业详情
export const EnterpriseLibByUid = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterpriselib/getEnterpriseLibByUid', { params: params }) } // 企业详情
export const PositionByEnterpriseId = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/getPositionByEnterpriseId', { params: params }) } // 根据企业查询职位
export const getPositionByEnterpriseIdShowAll = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/getPositionByEnterpriseIdShowAll', { params: params }) } // 根据企业查询职位
export const uploadLogo = baseUrl2 + '/dgdx-Api/enterprise/uploadLogo'// 上传logo
export const updateEnterpriseLogo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/updateEnterpriseLogo', { params: params }) } // 更新logo
export const SexState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getSexState', params) } // 性别
export const WageRangeState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getWageRangeState', params) } // 薪酬范围
export const WorkYearState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getWorkYearState', params) } // 工作年限
export const EducationState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getEducationState', params) } // 学历
export const getCollectionEnterpriseList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/collection/getCollectionEnterpriseList', { params: params }) }
export const cancelCollectionEnterprise = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/collection/cancelCollectionEnterprise', { params: params }) }
export const showMyCv = function (preams) { return axios.get(baseUrl2 + '/dgdx-Api/cv/showMyCv', { params: preams }) }

export const addbaseInfo = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvBaseInfo/add', params) } // 保存简历基本信息
export const selectAddJFPosition = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/jobFair/selectAddJFPosition', params) } // 企业参加招聘会

export const uploadCVPhoto = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvBaseInfo/uploadCVPhoto', params) } // 上传简历照片
export const updatebaseInfo = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvBaseInfo/update', params) } // 更新简历基本信息
export const CVBaseInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvBaseInfo/getCVBaseInfoByUserUid', { params: params }) } // 简历基本详情
export const getUserByUid = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/findByUserUid', { params: params }) } // 简历基本详情
export const searchUserInfoById = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/user/searchUserInfoById', params) } // 简历基本详情

export const JobIntentAdd = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvJobIntention/add', params) } // 添加求职意向
export const CVJobIntentById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvJobIntention/getCVJobIntentById', { params: params }) } // 添加求职意向
export const JobIntentUpdate = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvJobIntention/update', params) } // 更新求职意向
export const getJobIntentList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvJobIntention/getJobIntentList', { params: params }) } // 求职意向列表
export const JobIntent = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvJobIntention/getJobIntent', { params: params }) } // 求职意向
export const province = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/area/province', { params: params }) } // 省
export const city = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/area/city', { params: params }) } // 市
export const district = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/area/district', { params: params }) } // 区
export const login = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/user/login', params) } // 登录
export const useregister = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/user/register', params) } // 用户注册
export const updatePassword = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/user/updatePassword', params) } // 更新密码

export const loginCompany = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/enterprise/login', params) } // 企业登录
export const Companyregister = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/enterprise/register', params) } // 企业注册
export const CompanyRegisterUpdate = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/enterprise/registerUserMassage', params) } // 企业注册信息更新
export const CompanyRegisterDelete = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/deleteUserMassage', { params }) } // 企业注销
export const CompanyCheckMobileNum = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/checkMobileNum', { params: params }) } // 检查手机号
export const CompanyFindBackPassword = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/enterprise/findBackPassword', params) } // 重置密码
export const EnterpriseNature = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getEnterpriseNature', { params: params }) } // 企业性质
export const EnterpriseSize = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getEnterpriseSize', { params: params }) } // 企业规模

// 招聘会
export const AllJobFairByPage = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/jobFair/queryAllJobFairByPage', params) } // 招聘会list
export const getAllJobFair = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/jobFair/getAllJobFair', params) } // 招聘会list
export const DetailJobFairId = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getDetailJobFairId', { params: params }) } // 招聘会详情
export const AllJfPersonalByPage = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getAllJfPersonalByPage', { params: params }) } // 我报名的招聘会
export const EnterpriseInJobFair = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getEnterpriseInJobFair', { params: params }) } // 参加招聘会的企业数量
export const PositionInJobFair = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getPositionInJobFair', { params: params }) } // 参加招聘会职位数量
export const JobFairQuantity = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getJobFairQuantity', { params: params }) } // 参加招聘会人才数量
export const JobFairEnterprisesByPage = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getJobFairEnterprisesByPage', { params: params }) } // 一个招聘会的企业列表
export const enterpriseJoinJopFair = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/jobFair/enterpriseJoinJopFair', params) } // 招聘会企业报名

export const AllEnterpriseJobFairByPage = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getAllEnterpriseJobFairByPage', { params: params }) } // 企业申请的招聘会
export const getAllPositionByJobFairId = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getAllPositionByJobFairId', { params: params }) }// 获取招聘会内所有企业和职位列表
export const getJFAllEnterprise = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getJFAllEnterprise', { params: params }) }
export const searchJobFairEnterprisesByPage = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/searchJobFairEnterprisesByPage', { params: params }) }
export const getAgeList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getAgeList', { params: params }) }
// 温思远
export const myCv = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cv/getCv', { params: params }) } // 完整简历
export const updatePersonalCVInfo = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cv/updatePersonalCVInfo', params) } // 刷新简历

export const workAdd = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvExperience/add', params) } // 添加简历工作经历
export const deleteExperience = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvExperience/delete', { params: params }) } // 删除工作经历
export const CVExperienceById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvExperience/getCVExperienceById', { params: params }) } // find工作经历
export const ExperienceList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvExperience/getExperienceList', { params: params }) } // 工作经历
export const updateExperience = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvExperience/updateExperience', params) } // 更新工作经历
// 校内职务
export const addSchoolPosition = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvSchoolPosition/add', params) } // 添加校内职务
export const deletePosition = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvSchoolPosition/delete', { params: params }) } // 删除校内职务
export const updateSchoolPosition = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvSchoolPosition/updateSchoolPosition', params) }// 更新学校职位信息
export const CVSchoolPositionById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvSchoolPosition/getCVSchoolPositionById', { params: params }) } // find校内职务
export const getSchoolPositionList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvSchoolPosition/getSchoolPositionList', { params: params }) } // 获取学校职务信息列表
// 校内荣誉
export const addSchoolHonor = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvSchoolHonor/add', params) } // 添加校内荣誉
export const CVSchoolHonorById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvSchoolHonor/getCVSchoolHonorById', { params: params }) } // find校内荣誉
export const getSchoolHonorList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvSchoolHonor/getSchoolHonorList', { params: params }) } // 获取校内荣誉信息列表
export const deleteHonor = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvSchoolHonor/delete', { params: params }) } // 删除校内荣誉信息
export const updateSchoolHonor = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvSchoolHonor/updateSchoolHonor', params) }// 更新学校荣誉信息
// 技能
export const addSkill = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvSkill/add', params) } // 新增技能
export const getSkillList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvSkill/getSkillList', { params: params }) }// 获取技能列表
export const delSkill = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvSkill/delete', { params: params }) }// 获取技能列表
export const findSkill = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvSkill/getCVSkillById', { params: params }) }// 获取技能列表
export const updataSkill = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvSkill/updateSkill', params) }// 获取技能列表
// 简历证书信息
export const addCertification = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvCertification/add', params) }// 添加简历证书信息
export const cvCertificationDel = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvCertification/delete', { params: params }) }// 添加简历证书信息
export const CertificateList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvCertification/getCertificateList', { params: params }) }// 添加简历证书信息
export const CVCertificateById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvCertification/getCVCertificateById', { params: params }) }// 添加简历证书信息
export const updateCertificate = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvCertification/updateCertificate', params) }// 添加简历证书信息
// 学历
export const cvEductionAdd = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvEduction/add', params) }// 添加学历
export const cvEductionDel = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvEduction/delete', { params: params }) }// 删除学历
export const CVEducationById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvEduction/getCVEducationById', { params: params }) }// find学历
export const EducationList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvEduction/getEducationList', { params: params }) }// 学历List
export const updateEducation = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvEduction/updateEducation', params) }// 更新学历
// 培训
export const cvTraningAdd = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvTraning/add', params) }// 添加培训
export const cvTraningDel = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvTraning/delete', { params: params }) }// del培训
export const CVTrainingById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvTraning/getCVTrainingById', { params: params }) }// find培训
export const TrainingList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvTraning/getTrainingList', { params: params }) }// 培训List
export const updateTraining = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvTraning/updateTraining', params) }// 更新培训

// 我的收藏
export const addToMyCollection = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/myCollection/addToMyCollection', params) }// 添加到我的收藏
export const getMyCollectionList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/myCollection/getMyCollectionList', { params: params }) }// 获取收藏列表
export const cancleMyCollection = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/myCollection/cancelMyCollection', { params: params }) }// 取消收藏
export const addCollectionEnterprise = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/collection/addCollectionEnterprise', params) }
// 找人才
export const getFindPeopleList = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/findPeople/getFindPeopleList', params) }// 找人才列表
export const applyPositionMy = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/apply/position', params) }// 申请职位
export const TreatmentState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getTreatmentState', { params: params }) }// 企业待遇 五险一金啥的
export const MarryState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getMarryState', { params: params }) }// 婚姻状况
export const WatchCVState = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/dict/getWatchCVState', { params: params }) }// 简历状态

// 个人中心 我的申请
export const getPositionListByCollection = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/apply/getAllApplyPosition', { params: params }) }// 根据收藏查询职位列表
export const deleteCVJobIntention = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvJobIntention/delete', { params: params }) }// 删除查询职位列表
export const WhoWatchMeByPage = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/whoWatchMe/getWhoWatchMeByPage', { params: params }) }// 谁看过我
export const updateEnterpriseLicence = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/updateEnterpriseLicence', { params: params }) }// 更新企业营业执照
// export const updatePersonalCVInfo = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/enterprise/updateEnterpriseLicence', { params: params }) }// 更新企业营业执照
export const uploadLicence = baseUrl2 + '/dgdx-Api/enterprise/uploadLicence'// 营业执照
export const uploadHeadImage = baseUrl2 + '/dgdx-Api/user/uploadHeadImage'// 上传头像
export const enterpriseImage = baseUrl2 + '/dgdx-Api/enterprise/uploadImage'// 上传企业相册

export const duqupget = function (params) { return axios.get('http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1', params) }// 去读
export const addPosition = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/position/addPosition', params) }// 添加职位
export const addImageToAlbum = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/enterprise/addImageToAlbum', params) }// 保存企业相册
export const deleteEnterpriseImage = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/enterprise/deleteEnterpriseImage', { params: params }) }// 删除企业相册
export const deletejobPosition = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/position/deletePosition', { params: params }) }// 删除职位
export const getAllApplyCVByPage = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/applyCVManagement/getAllApplyCVByPage', params) }// 应聘简历管理列表
export const updatePositionState = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/position/updatePositionState', params) }// 忘记密码

export const cvProjectExperienceAdd = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/cvProjectExperience/add', params) }// 添加工作经验信息
export const cvProjectExperienceDel = function (params) { return axios.delete(baseUrl2 + '/dgdx-Api/cvProjectExperience/delete', { params: params }) }// 删除工作经验信息
export const CVProjectExperienceById = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvProjectExperience/getCVProjectExperienceById', { params: params }) }// find工作经验信息
export const CVProjectExperienceList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvProjectExperience/getCVProjectExperienceList', { params: params }) }// 工作经验信息
export const updateCVProjectExperience = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/cvProjectExperience/updateCVProjectExperience', params) }// find工作经验信息
export const RecommendPersonList = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/recommend/getRecommendPersonList', { params: params }) }// 推荐人才
export const personalJoinJopFair = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/jobFair/personalJoinJopFair', params) }// 个人申请参加招聘会

// GASG
export const sendMessage = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/sms/sandMassage', params) } // 发送短信验证码
export const uploadFileUrl = baseUrl2 + '/dgdx-Api/cvFile/uploadFile' // 上传简历文件
export const cVFileByPage = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvFile/getCVFile', { params: params }) } // 获取简历文件列表
export const UpdatePositionApplyState = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/applyCVManagement/getUpdatePositionApplyState', params) } // 更改申请简历状态
export const deleteCVFile = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvFile/deleteCVFile', { params }) } // 删除简历附件
export const mobileLogin = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/user/mobileLogin', params) } // 用户手机号登录
export const userIdLogin = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/user/idCodeLogin', params) } // 用户身份证号登录
export const qrLogin = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/user/idCodeLoginSm', params) } // QR用户身份证号登录

export const userCheckMobileNum = function (params) { return axios.get(baseUrl2 + '/dgdx-Api//user/checkMobileNum', { params }) } // 用户身份证号登录
export const userFindBackPassword = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/user/findBackPassword', params) } // 用户身份证号登录

export const CompanyMobileLogin = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/enterprise/mobileNoLogin', params) } // 企业手机号登录
export const CompanyIdLogin = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/enterprise/idCodeLogin', params) } // 企业身份证号登录
export const CompanyUpdatePass = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/enterprise/updatePassword', params) } // 企业修改密码
export const WatchPersonal = function (params) { return axios.post(baseUrl2 + '/dgdx-Api/whoWatchMe/EnterpriseWatchPersonalCV', params) } // 企业查看个人简历
export const getJFHotPosition = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/jobFair/getJFHotPosition', { params }) } // 获取招聘会热门职位
export const updateJoinState = function (params) { return axios.put(baseUrl2 + '/dgdx-Api/jobFair/updateJoinState', params) } // 取消报名

// 敏感词
export const checkSensWords = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/key_word/chack_in_group_key_word', { params: params }) } // 获取敏感词
// export const getSensWords = function () { return axios.get(baseUrl2 + '/dgdx-Api/key_word/get_a_group_key_word') } // 获取敏感词

// 留言板
export const GetLYHistory = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/ly_log_ctro/search_ly_by_qzz_id_zpz_user_id_zw_id', { params: params }) } // 获取留言内容
export const AddLY = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/ly_log_ctro/add_ly', { params: params }) } // 获取留言内容
export const ReadLY = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/ly_log_ctro/ly_edit_read', { params }) } // 标记留言已读

// 双面机 根据身份证查用户简历
export const findCVBaseInfoByIdCode = function (params) { return axios.get(baseUrl2 + '/dgdx-Api/cvBaseInfo/findCVBaseInfoByIdCode', { params }) } // 简历基本详情

export const dengji = { 1: '一般', 2: '熟练', 3: '精通' }
export const findJobStatus = { 0: '请选择求职状态', 1: '在职-不想换工作', 2: '在职-正在观望', 3: '离职-正在找工作' }
export const workType = { 1: '全职', 2: '兼职' }
export const marryStatus = { 0: '请选择婚姻状态', 1: '未婚', 2: '已婚', 3: '离异' }
export const sexlist = { 1: '男', 2: '女' }

export const GetUrlParam = function (paraName) {
  var url = document.location.toString()
  var arrObj = url.split('?')

  if (arrObj.length > 1) {
    var arrPara = arrObj[1].split('&')
    var arr

    for (var i = 0; i < arrPara.length; i++) {
      arr = arrPara[i].split('=')

      if (arr != null && arr[0] === paraName) {
        return arr[1]
      }
    }
    return ''
  } else {
    return ''
  }
}

export const formatDate = function (time) { // 时间格式化
  const date = new Date(time)
  const year = date.getFullYear()
  let month = date.getMonth() + 1 // 月份是从0开始的
  let day = date.getDate()
  if (month < 10) {
    month = '0' + month
  }
  if (day < 10) {
    day = '0' + day
  }
  const newTime = year + '-' +
    month + '-' + day
  return newTime
}

export const GetQueryString = function (name) {
  const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
  const r = window.location.search.substr(1).match(reg)
  if (r != null) return unescape(r[2])
  return null
}
